<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>06.父项属性-align-content</title>

  <style>
  *{
    padding: 0px;
    margin: 0px;
  }

  .subnav-entry{
    width: 510px;
    margin: 100px auto;
    background-color: #fff;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 3px;
  }

  .subnav-entry li{
    width: 100px;
    background-color: #f1f1f1;
    margin: 1px;
    padding: 2px 0;
  }

  .subnav-entry a , .grid-subnav-entry a{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #444;
    font-size: 12px;
  }

  .subnav-entry-icon, .grid-subnav-entry-icon{
    width: 28px;
    height: 28px;
    background-color: pink;
    margin-top: 5px;
    background: url(https://ws-s.tripcdn.cn/modules/basebiz/h5home/hotel_inn.cbccfdc8449dea7bf83171dfa7ea6f81.png) no-repeat;
    background-size: 28px auto;
    margin-bottom: 2px;
  }

  .grid-subnav-entry{
    width: 508px;
    margin: 100px auto;
    background-color: #fff;
    display: grid;
    grid-template-columns: repeat(auto-fill,100px);
    list-style: none;
    gap: 2px;
    padding: 3px;
  }

  .grid-subnav-entry li{
    width: 100px;
    background-color: #f1f1f1;
  }

  </style>
</head>
<body style="background-color: #f1f1f1;">

  <h4>flex方式</h4>
  <ul class="subnav-entry">
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
  </ul>

  <h4>gird方式</h4>
  <ul class="grid-subnav-entry">
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
    <li>
      <a href="#">
        <span class="grid-subnav-entry-icon"></span>
        <span>民宿/客栈</span>
      </a>
    </li>
  </ul>

</body>
</html>